using System;
using System.Globalization;
using System.Runtime.Serialization;

namespace UnitTesting.Fixturing
{
	[Serializable]
	public class NotResolvedValueException : ValueProviderException
	{
		public NotResolvedValueException()
		{
		}

		public NotResolvedValueException(string message) : base(message)
		{
		}

		public NotResolvedValueException(string message, Exception inner)
			: base(message, inner)
		{
		}

		internal NotResolvedValueException(Type type)
			: this(type, null)
		{
		}

		internal NotResolvedValueException(Type type, Exception inner)
			: base(string.Format(CultureInfo.InvariantCulture, "The type '{0}' is not resolved from the value provider.", Ensure.IsNotNull(() => type)), inner)
		{
		}

		protected NotResolvedValueException(
			SerializationInfo info,
			StreamingContext context) : base(info, context)
		{
		}
	}
}